Creating and Editing Segments
A Segment Document is a query rule definition that when executed, creates a group of records by applying a set of rules to a dataset at that time. Saving a document saves the segment rule but does not save the results of the query as these will be recalculated on each access and execution of the segment document. The rules are built using the Segment Builder screen.
You can save segment rules to the Segment library (as segment documents), and then use the segment documents to select the audiences for your campaigns or as filters or segments in Insights. See Creating and Editing Campaigns in Campaign Designer or Venn Insight Builderfor full details.
Note: |
Segments are always calculated using the latest data in the database. If the data changes and you recalculate a Segment, the Segment counts may change. After a Segment has been added to a campaign, you have the option to lock the Segment so that the counts don't change once the campaign has started. |
When you have finished editing or creating your Segment, you add it to a campaign using the Audience element in the Campaign View screen (See Creating and Editing Campaigns in Campaign Designer).
Creating New Segments in Segment Builder
Click the New Segment button at the top of the Segment View screen.
Procedure
First you need to select the database table that the segment is based on, this is called the Resolution Level. For example, do you want to create a segment of Customers, Orders, Households, etc.? From the Select Table drop-down, select the resolution level table for the segment. You can either navigate to the table or you can search for it by clicking the search icon, alternatively drag the required table from the Data Tree in the left hand pane..
- Click the Select button.
After you have selected your database table, the segment is locked to that datasource and you can't use columns from other datasources in the Segment rules, as they are not linked to the selected table. For more information, see 'Resolution Levels'.
Select an operator to specify how the rules are connected:
Include if All
|
Include defines that the result of the rules or groups at the document level will be included in the final document result. The All defines an AND operator for combining the rules or groups that are at the document level. |
For example, having two rules in the document of Gender=F AND Age=30 will return in the result all females that are 30 years old. This result will be Included in the final result of the document. |
Include if Any
|
Include defines that the result of the rules or groups at the document level will be included in the final document result. The Any defines an OR operator for combining the rules or groups that are at the document level. |
For example, having two rules of Gender=F OR Age=30 will return in the result all females along with all 30 year olds, which at this point will contain males. This result will be Included in the final result of the document. |
- To add a rule or group to the Segment, you can either click the Add
icon and select Add Rule or Add Group from the drop-down list or to create a Group, drag a Table object from the Date Tree, which will create a Group resolved at that table level and to create a rule, drag the column from the Data Tree. The Value Picker at the bottom of the Data Tree pane can be sued to create a pre-populated rule based on one or more selected values. Note that this will default to an "equals" operator which can then be edited in-line
- Rules - a single rule is a column and value combination that identifies the people you will either include or exclude from the segment based on the operator used i.e. Equal to, Not equal to. The database columns available for a rule are determined by the top resolution level table.
- Groups - a group is a sub-branch of the calculation that can have a different resolution level and a different group operator to the top resolution level table. These are very powerful tool in segment creation. For example, your document could count Customers, but you could use a group to create a list of product orders (with the group resolved to your ORDER table) based on a variety of criteria which would combine those Orders together in a query, prior to resolving to the Customer level. You may wish to see Customers who placed orders in a certain month using a certain payment type. This would require an Order level group to AND those orders together so when embedded within a Customer level segment document, will display Customers who placed an order meeting those criteria. A Group has an extended set of options for how the rules within that group will be applied within the context of the document. The table below outlines how the group level options function within the context of the segment document.
Include if All
|
Include on a group defines that the final result of this group will be included in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old , and the Include defines that the result of this group will include all females that are 30 years old in the document as a whole (or in the groups parent object) |
Include if Any
|
Include on a group defines that the final result of this group will be included in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), and the Includedefines that the result of this group will include all females, along with all 30 year olds, in the document as a whole (or in the groups parent object). |
Exclude if All
|
Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old, but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object). |
Exclude if Any
|
Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. |
For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object). |
- When creating a rule definition, either drag the column or values from the Data Tree view or select the database column for the rule from the Select Column drop-down. You can navigate to the column or you can search for it by clicking the search
icon. Click the Select button. An icon will display the data type of the column selected
- Select the inclusion criteria desired for the query. Note than some criteria operators are not useful or relevant for particular data types, so the inclusion criteria displayed depend on the column’s data type, and will be a sub-set of the options in the table below. For this Display TEXT and UNICODE TEXT are both displayed as TEXT type.
Equal to |
Returns records that meet the specified value. Valid and available for all data types. |
Not equal to |
Returns records that do not meet the specified value. Valid and available for all data types. |
Between |
Returns records based on a range of values. Available for all Data Types except TEXT or UNICODE TEXT where Between is not supported. |
Contains |
Returns records that contain the specified text string (case-sensitive). Only available on TEXT/UNICODE TEXT data types. |
Does not contain |
Returns records that do not contain the specified text string (case-sensitive). Only available on TEXT/UNICODE TEXT data types. |
Greater than |
Returns records with a value greater than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Greater than is not supported. |
Greater than or equal to |
Returns records with a value equal to or greater than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Greater than or equal to is not supported. |
Less than |
Returns records with a value less than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Less than or equal to is not supported. |
Less than or equal to |
Returns records with a value equal to or less than the one specified. Available for all Data Types except TEXT or UNICODE TEXT where Less than or equal to is not supported. |
Has no value |
Returns all records for which there is no value. For example, if applied to the Income field, the records returned will be for customers who have not provided their income details. Available on all data types |
Has a value |
Returns all records for which there is a value. For example, if applied to the Income field, the records returned will be for customers who have provided their income details. Available on all Data types |
Before |
Returns all records, for Date, Time and DateTime columns where the records are before the specified value, and only supported on those data types. |
After |
Returns all records, for Date, Time and DateTime columns where the records are after the specified value, and only supported on those data types. |
Number Days Before
Number Days After
|
A special inclusion criteria for Date and DateTime columns.
Provides the ability to set inclusion rules based on the value in the Date column being a number of days to or from Today. The UI then allows further criteria operates of:
- Equal to
- Not equal to
- Greater than
- Greater than or equal to
- Less than
- Less than or equal to
Example 1 - if the column selected is a Contract End Date, the inclusion criteria chosen is Number Days After (Today), and the operator is Less than 7, the included rows would be those with a Contract End Date that is less than 7 days after today i.e. in the next 7 days.
Example 2 - if the column selected is Last Transaction Date, the inclusion criteria chosen is Number Days Before (Today), and the operator is Less than 7, the included rows would be those with a Last Transaction Date that is less than 7 days before today i.e. they had a transaction in the last 7 days.
NOTES:
- These queries will no longer accept negative values. Any negative values will now return zero rows.
|
Days to Anniversary From
Days since Anniversary From
|
A special inclusion criteria for Date and DateTime columns.
Provides the ability to set inclusion rules based on the anniversary of the value in the Date column being a number of days to or since Today. The UI then allows further criteria operates of:
- Equal to
- Not equal to
- Greater than
- Greater than or equal to
- Less than
- Less than or equal to
Example 1 - if the column selected is a Customer Joined Date, the inclusion criteria chosen is Number Days After (Today), and the operator is Less than 7, the included rows would be those with an anniversary of their Customer Joined Date, that is less than 7 days after today i.e. in the next 7 days.
Example 2 - if the column selected is Customer Joined Date, the inclusion criteria chosen is Number Days Before (Today), and the operator is Less than 7, the included rows would be those with an anniversary of their Customer Joined Date that is less than 7 days before today i.e. in the last 7 days.
NOTES:
- These queries will no longer accept negative values. Any negative values will now return zero rows.
- Due to the anniversary nature of these queries, these will not return records when querying over 364 days
|
- Select the values for the contents of the column. Click the value picker
icon to view the values available for the column and the counts for each value. Click the x in the value picker field to clear the contents.
note this display is dependent on index properties n a column which are set by the administrator and cannot be changed at this time. If value are not available, a suitable message will display.
- Enter values either manually or by selecting them from the value picker.
Note: |
Values entered manually are case sensitive. For example, for a Country column, 'Switzerland' will return results, whereas 'switzerland' will not. When the Select Value field contains a value, it has a colored background:
Grey box validation |
The format of the value is valid and there are matching values in the database.
|
Red Box validation |
The format of the value is not valid, for example text in a numeric column. The Calculate segment button is disabled when the format is not valid.
|
|
Nulls - if you want to select columns that contain no value, use the Has no value option to specify null.
Value blue bars - the value picker displays available values and their respective counts, along with blue bars that represent the frequency of that value relative to the size of the table. The counts and the blue bars will reflect the selected operator. For example, in the Age column, the counts and blue bars will change if you first select the Equal operator (all age values displayed) and then select the Greater than operator (only values greater than your selected value are displayed).
If you want to view records that are currently selected in a rule, group or segment, click the Record Viewer icon. Record Viewers are only active when the counts have been refreshed.
See 'Record Viewer' for more information.
- Click the Calculate segment button
at the top of the screen to verify that your selected criteria return results that you expect. The button is blue available when a segment in ready for calculation.
Note: |
Counts are not saved in a document as each time the document is executed is is done against the current instance of the database. |
- When you have finished creating the segment, it can be saved and closed.
- You can also add a description of the document. If you want to change the description at any time, click Settings at the top of the Segment Builder screen, enter your new description and click Apply.
- If you want to save the document as a Master Segment, click the Master Segment check box at the bottom of the save dialog. If you do not see the Master Segment check box, you do not have permission to create Master Segments.
|
|